<template>
	<view class="cashier" style="justify-content: start;">
		<view class="cashier-con">


			<view class="">
				<view class="" style="padding-left: 30rpx;padding-top: 40rpx;">
					<view class="" style="font-size: 26rpx;">
						付款金额
					</view>
					<view class=""
						style="margin-top: 40rpx;padding-bottom: 40rpx;border-bottom: 1rpx solid #ECECEC;display: flex;align-items: center;">
<text style="margin-right: 10rpx;">￥</text>
						<input type="text" v-model="Info.price" placeholder="请输入">
					</view>
				</view>

				<view class="" style="background-color: #FBFBFB;height: 20rpx;">

				</view>
				<view class="" style="background-color: white;padding-top: 40rpx;padding-left: 30rpx;">
					<view class="">
						订单编号：{{order_no}}
					</view>
					<view class="" style="margin-top: 40rpx;padding-bottom: 20rpx;">
						支付方式：
					</view>
				</view>
			</view>
			<view class="payType" v-if="type != 2">
				<view class="payType-list" @tap="radioChange(1)">
					<view class="payType-text">
						<image mode="widthFix" src="/static/image/index/add_images/yl.png"></image>
						<span style="margin-left: 10rpx;">汇付-快捷支付</span>
					</view>
					<view>
						<radio value="1" :checked="radioVal == 1 ? true : false"
							:color="radioVal == 1 ? '#FF2842' : ''" />
					</view>
				</view>
				<text class="payType-xia"></text>

			</view>

		</view>
		<button class="cashier-btn" :loading="loading" @tap="topay" style="margin-top: 70rpx;">立即支付</button>
		<!-- <shop-loading v-if="shopLoad"></shop-loading> -->
	</view>
</template>

<script>
	import {
		customPay
	} from '@/common/index.js';
	import {
		debounce
	} from '@/static/js/utils.js';
	export default {
		data() {
			return {

				Url: this.Imgurl,
				radioVal: 1,
				type: 1,
				loading: false,
				id: 0,
				blance: {},
				shopLoad: true,
				opsData: {}, //拼团团id
				order_no: '',
				Info: {
					price: ''

				}


			};
		},
		onLoad(ops) {
			// console.log(ops)


			 
			// this.state = data.state
 
			// this.radioVal = data.type != 2 ? 1 : 3
		},
		methods: {
			//支付
			topay() {
				customPay(this.Info).then((res) => {
					
					if(res.code == 1){
						window.location.href=res.msg;
					}else{
						this.toast(res.msg);
					}
					// if(res.code == 1){
					// 	uni.reLaunch({
					// 		url: '/pageD/pay-Success/pay-Success?payType=1&type=2'
					// 	});
					// }
				})
			}
		}

	};
</script>
<style>
	page {
		height: 100%;
	}
</style>
<style lang="scss">
	uni-page-body {
		-webkit-overflow-scrolling: touch;
		height: 100%;
		background: white;
		width: 100%;
		font-size: 15px;
		font-family: NotoSansHans-Bold;
		color: #333;
		overflow-x: hidden;
	}

	.cashier {
		height: 100%;
		width: 100%;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		overflow-x: hidden;

		&-btn {
			width: calc(100% - 30upx);
			margin: 30upx auto;
			display: block;
			padding: 5px 0;
			border-radius: 10upx;
			font-size: 32upx;
			color: #ffffff;
			background-color: #ff2842;

			&::after {
				border: none;
			}
		}

		&-view {
			width: 100%;
			padding: 81upx 0;
			box-sizing: border-box;
			background-color: #ffffff;
			margin: 20upx 0;

			text {
				display: block;
				text-align: center;
				font-size: 36upx;
				color: #333333;
				margin-bottom: 30upx;

				&:last-child {
					font-size: 50upx;
					font-weight: bold;
				}

				&.price {
					&::before {
						content: '￥';
						font-size: 40upx;
					}
				}
			}
		}

		.payType {
			width: 100%;
			background-color: #ffffff;
			margin: 0 auto;

			.payType-xia {
				height: 2upx;
				width: 90%;
				background-color: #f9f9f9;
				display: block;
				margin: 0 auto;
			}

			.payType-list {
				display: flex;
				align-items: center;
				justify-content: space-between;
				padding: 26upx;
				box-sizing: border-box;

				.payType-text {
					font-size: 28upx;
					color: #333333;
					display: flex;
					align-items: flex-end;

					image {
						width: 36upx;
						height: 36upx;
						margin-right: 10upx;
					}

					text {
						font-size: 20upx;
						color: #999999;
					}
				}

				/deep/ {
					uni-radio .uni-radio-input {
						-webkit-appearance: none;
						appearance: none;
						margin-right: 5px;
						outline: 0;
						border: 1px solid #d1d1d1;
						background-color: #fff;
						border-radius: 50%;
						width: 36upx;
						height: 36upx;
						position: relative;
					}
				}
			}
		}
	}
</style>